package com.tbit.uqbike.client.constant;

import com.braintreegateway.BraintreeGateway;
import com.tbit.uqbike.client.pojo.*;
import com.tbit.uqbike.client.pojo.newEntity.BikePos;
import com.tbit.uqbike.client.pojo.newEntity.ReturnBikeLog;
import com.tbit.uqbike.client.pojo.newEntity.UserDelayPay;
import com.tbit.uqbike.client.pojo.vo.VerticalLog;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 系统数据
 *
 * @author Leon
 * 2017年3月8日 下午5:11:40
 */
public class SystemData {
    /**
     * 短信验证码手机和验证码哈希
     */
    public static Map<String, String> authCode = new ConcurrentHashMap<String, String>();

    /**
     * 强制解锁密钥
     */
    public static String forceReturnSecret = "QWERTYUIOP";

    /**
     * 终端流水报文信息
     */
    public static Map<String, TerControlMsg> terControlMap = new ConcurrentHashMap<String, TerControlMsg>();

    /**
     * 按分钟计算费用误差
     */
    public static Map<Integer, FeeDeviation> feeDeviationMap = new ConcurrentHashMap<Integer, FeeDeviation>();

    /**
     * 用户借车时间
     */
    public static Map<String, String> userRentTime = new ConcurrentHashMap<String, String>();

    /**
     * 用户还车开始时间
     */
    public static Map<String, String> orderTime = new ConcurrentHashMap<String, String>();
    /**
     * 用户还车道钉时间
     */
    public static Map<String, String> userBle = new ConcurrentHashMap<String, String>();
    /**
     * 道钉还车状态
     */
    public static Map<String, Long> bleMap = new ConcurrentHashMap<String, Long>();
    /**
     * 还车方式
     */
    public static Map<String, Integer> returnTypeMap = new ConcurrentHashMap<String, Integer>();

    /**
     * 蓝牙道钉
     */
    public static Map<String, BleNode> bleNodeMap = new ConcurrentHashMap<String, BleNode>();

    /**
     * 中科支付余额支付推送
     */
    public static List<String> ZK_PUSH_LIST = new ArrayList<>();
    /**
     * 垂直停车
     */
    public static Map<String, VerticalLog> verticalMap = new ConcurrentHashMap<String, VerticalLog>();
    /**
     * 控制指令开放集合
     */
    public static Map<String, Integer> controlMap = new ConcurrentHashMap<String, Integer>();
    /**
     * 支付宝小程序id和用户idg关系
     */
    public static Map<Integer, String> aliPayMap = new ConcurrentHashMap<Integer, String>();
    /**
     * 推送日志
     */
    public static List<MqData> pushList = new ArrayList<>();
    /**
     * 推送日志哈希map
     */
    public static Map<String, RideBattery> pushMap = new ConcurrentHashMap<>();
    /**
     * 借还车位置日志
     */
    public static List<ReturnBikeMsg> bikeMsgList = new ArrayList<>();
    /**
     * 品牌旗下区域缓存
     */
    public static Map<Integer, List<Integer>> brandAgentMap = new HashMap<>();
    /**
     * 设备软件版本号哈希
     */
    public static Map<String, String> machineSofewareInfoMap = new ConcurrentHashMap<String, String>();
    /**
     * 借还车位置日志
     */
    public static List<ReturnBikeLog> logList = new ArrayList<>();
    /**
     * 站点缓存哈希
     */
    public static Map<String, List<ParkPoint>> parkPointMap = new ConcurrentHashMap<String, List<ParkPoint>>();
    /**
     * paypal支付客户端连接哈希map
     */
    public static Map<String, BraintreeGateway> braintreeGatewayMap = new ConcurrentHashMap<>();
    /**
     * 车辆缓存哈希
     */
    public static Map<String, Machine> machineInfoMap = new ConcurrentHashMap<String, Machine>();
    /**
     * 还车校验信息缓存哈希
     */
    public static Map<String, Map<String, Object>> ridelogMap = new ConcurrentHashMap<String, Map<String, Object>>(8);
    /**
     * 用户延时分账缓存
     */
    public static List<UserDelayPay> UserDelayPayList = new ArrayList<>();
    /**
     * 借还车位置信息
     */
    public static List<BikePos> BikePosList = new ArrayList<>();
    /**
     * 禁行区道钉缓存
     */
    public static Map<String, Integer> accountSpikeMap = new ConcurrentHashMap<>();
    /**
     * 还车数据分析日志
     */
    public static List<ReturnBikeMsgLog> returnBikeMsgLogList = new ArrayList<>();

    static {
        controlMap.put("control.8", 8);
        controlMap.put("control.9", 9);
        controlMap.put("control.22", 22);
        controlMap.put("control.23", 23);
        controlMap.put("control.51", 51);
    }

    static {
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.8_05-21-2020 14:26:28 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.1.0_07-14-2020 20:44:39 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.9_06-10-2020 13:38:38 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.5_01-09-2020 20:58:06 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.4_12-13-2019 10:00:54 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.1.1_07-25-2020 23:07:21 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.9_07-01-2020 17:22:09 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WD-215_R.62.0.9_06-19-2020 18:54:55 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.8_05-19-2020 15:35:26 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.6_04-18-2020 09:42:54 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.6_03-26-2020 14:15:58 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.8_05-21-2020 17:30:58 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.8_05-08-2020 14:32:07 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WD-215_R.62.0.8_05-30-2020 18:49:13 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.5_05-09-2020 21:41:49 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.9_07-01-2020 17:26:05 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.8_05-12-2020 10:11:39 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.5_03-13-2020 11:35:52 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WD-215_R.62.0.6_04-17-2020 22:35:02 &T650_G.C.6531E_GD_UBLOX_ACC_BLE_ECU_OTA", "1");
        machineSofewareInfoMap.put("NS_TBIT_WA-209D_R.62.0.2_09-05-2019 11:29:26 &T650_G.C.6531E_GD_UBLOX_BLE_ECU_OTA", "1");
    }
}
